package com.eling.elcms.system.model;

import com.eling.elcms.community.model.Organization;
import com.eling.elcms.core.dao.annotation.In;
import com.eling.elcms.core.model.BaseModel;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.IndexedEmbedded;

import javax.persistence.*;

@Entity
@Table(name = "cm_organizationbusinesstype")
@Indexed
public class OrganizationBusinessType extends BaseModel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8812875321082806266L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @In
    private Long pkOrganizationBusinessType;
    
	@ManyToOne
	@JoinColumn(name = "pkOrganizationUser")
	@IndexedEmbedded
    private Organization organization;
	@Field
	@Column
    private Long pkBusinessType;

	public Long getPkOrganizationBusinessType() {
		return pkOrganizationBusinessType;
	}

	public void setPkOrganizationBusinessType(Long pkOrganizationBusinessType) {
		this.pkOrganizationBusinessType = pkOrganizationBusinessType;
	}



	public Organization getOrganization() {
		return organization;
	}

	public void setOrganization(Organization organization) {
		this.organization = organization;
	}

	public Long getPkBusinessType() {
		return pkBusinessType;
	}

	public void setPkBusinessType(Long pkBusinessType) {
		this.pkBusinessType = pkBusinessType;
	}
	
}
